﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using 批量数据操作.T_UsersTableAdapters;
using System.Diagnostics;

namespace 批量数据操作
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Stopwatch sw = new Stopwatch();
            sw.Start();
            T_UsersTableAdapter adapter = new T_UsersTableAdapter();
            adapter.Connection.Open();
            for (int i = 0; i < 3000; i++)
            {
                adapter.Insert(i.ToString(), i.ToString(), 0);
            }
            adapter.Connection.Close();
            sw.Stop();
            MessageBox.Show(sw.Elapsed.ToString());
        }
    }
}
